package service

type ChainService interface{
	// transfer 转帐token到地址地址
	Transfer(toAddress string, amount int) (string, error)
	// 验证checkIn的交易hash是否正确
	VerifyCheckinHash(address,hash string) (bool,error)
}

type chainServiceImpl struct{
	
}

func NewChainService() ChainService{
	return &chainServiceImpl{}
}

func (s *chainServiceImpl) Transfer(toAddress string, amount int) (string, error) {
	// 验证交易hash是否正确
	// TODO: 转帐token到指定用户账户
	return "0xo",nil
}

func (s *chainServiceImpl) VerifyCheckinHash(address,hash string) (bool,error){
	// TODO: 验证checkIn的交易hash是否正确
	return true,nil
}
